package com.hengpeng.itfints.tags;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;

import com.hengpeng.itfints.config.ConfigUtil;

public class XmlKeyTag extends TagSupport
{
	private static final long serialVersionUID = 2518699676747944671L;

	private String key;

	private Integer gameId;

	public String getKey()
	{
		return key;
	}

	public void setKey(String key)
	{
		this.key = key;
	}

	public Integer getGameId()
	{
		return gameId;
	}

	public void setGameId(Integer gameId)
	{
		this.gameId = gameId;
	}

	@Override
	public int doStartTag() throws JspException
	{
		super.doStartTag();
		String value = ConfigUtil.getParameter(key);
		try
		{
			pageContext.getOut().print(value);
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}
		return SKIP_BODY;
	}
}
